class Solution:
    def superEggDrop(self, k: int, n: int) -> int:
        ans = 0
        while k > 1 and n > 0:
            m = (n + 1) // 2
            n = max(m - 1, n - m)
            k -= 1
            ans += 1
        return ans + n - 1


s = Solution()
print(s.superEggDrop(2, 6))
